package club.guadazi.wemarket.entity;

import club.guadazi.wemarket.util.excel.Excel;
import club.guadazi.wemarket.util.excel.ExcelCellDataTransfer;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.util.Date;

public class OrderSimpleInfo implements Serializable {

    private int orderSimpleId;
    /**
     * 姓名
     **/
    @Excel(excelName = "姓名", x2oTransfer = ExcelCellDataTransfer.NONE)
    private String userName;
    /**
     * 快递公司名称
     **/
    @Excel(excelName = "快递公司名称", x2oTransfer = ExcelCellDataTransfer.NONE)
    private String postCompany;
    /**
     * 快递单号
     **/
    @Excel(excelName = "快递单号", x2oTransfer = ExcelCellDataTransfer.NONE)
    private String postNo;
    /**
     * 下单时间
     **/
    @Excel(excelName = "下单时间", x2oTransfer = ExcelCellDataTransfer.Date)
    private Date orderTime;
    /**
     * 产品名称
     **/
    @Excel(excelName = "产品名称", x2oTransfer = ExcelCellDataTransfer.NONE)

    private String productName;

    public void setOrderSimpleId(int orderSimpleId) {
        this.orderSimpleId = orderSimpleId;
    }

    public int getOrderSimpleId() {
        return orderSimpleId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setPostCompany(String postCompany) {
        this.postCompany = postCompany;
    }

    public String getPostCompany() {
        return postCompany;
    }

    public void setPostNo(String postNo) {
        this.postNo = postNo;
    }

    public String getPostNo() {
        return postNo;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductName() {
        return productName;
    }

    public String check() {
        if (StringUtils.isEmpty(userName)) {
            return "姓名不能为空";
        }
        if (StringUtils.isEmpty(productName)) {
            return "商品名称不能为空";
        }
        return null;
    }
}
